shutdown
Type
message
Summary
Sent to the current card of the defaultStack when the application is quitting.
Syntax
shutdown
Description
Handle the shutdown message if you want to perform cleanup tasks before the application quits.
The actual quit process is not triggered by the shutdown message, so trapping the message and not allowing it to pass does not prevent the application from quitting.
In standalones, some care is needed to ensure you receive the shutdown message if your application uses multiple stacks. The most reliable approach is to install a library stack or backscript to handle the message when your application starts up.
Applications will not receive this message when running in the IDE.
Examples
on shutdown
save stack "Preferences"
pass shutdown
end shutdown
Related
control structure: pass
glossary: application, trap, message, current card
message: closeStack, closeCard, closeBackground, suspend
property: defaultStack, defaultStack
command: quit
Compatibility and Support
Introduced
LiveCode 1.0
OS
mac
windows
linux
ios
android
Platforms
desktop
server
mobile